/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package org.flower.httprc.http;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 *
 * @author ZhuYanXin
 */
@JsonIgnoreProperties(value = {"filesKey", "lstFile"})
public class HttpReq {

    private String uri;
    private String contentType;
    private String charset;
    private String method;
    private String jsonParam;
    private String filesKey;
    private Map<String, String> header;
    private Map<String, String> formParam;
    private List<File> lstFile;

    public HttpReq() {
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getJsonParam() {
        return jsonParam;
    }

    public void setJsonParam(String jsonParam) {
        this.jsonParam = jsonParam;
    }

    public String getFilesKey() {
        return filesKey;
    }

    public void setFilesKey(String filesKey) {
        this.filesKey = filesKey;
    }

    public Map<String, String> getHeader() {
        return header;
    }

    public void setHeader(Map<String, String> header) {
        this.header = new HashMap<>();
        this.header.putAll(header);
    }

    public Map<String, String> getFormParam() {
        return formParam;
    }

    public void setFormParam(Map<String, String> formParam) {
        this.formParam = new HashMap<>();
        this.formParam.putAll(formParam);
    }

    public List<File> getLstFile() {
        return lstFile;
    }

    public void setLstFile(List<File> lstFile) {
        this.lstFile = new ArrayList<>();
        this.lstFile.addAll(lstFile);
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
